package kd.fi.gl.util.wchn;

import kd.bos.dataentity.TypesContainer;

import java.util.HashMap;
import java.util.Map;

/**
 * 二开微服务工厂类
 */
public class ServiceFactory {
    private static Map<String,String> serviceMap = new HashMap<>();
    static {
        serviceMap.put("JkService", "kd.fi.gl.util.wchn.JkServiceImpl");
//        serviceMap.put("MkImageReceptService", "kd.fi.gl.util.wczd.MkImageReceptionServiceImpl");

    }

  public static Object getService(String serviceName) {
        String className = (String)serviceMap.get(serviceName);
        return TypesContainer.getOrRegisterSingletonInstance(className);
    }

    public static Object getServiceName(String serviceName){
        String className = serviceMap.get(serviceName);
        return TypesContainer.getOrRegisterSingletonInstance(className);
    }
}
